package cn.meye11.crm.domain.model;

import cn.meye11.crm.domain.entity.ConsumptionRecordsEntity;
import lombok.*;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * 消费记录表(ConsumptionRecords)模型类
 *
 * @author makejava
 * @since 2023-11-18 19:20:43
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//@ApiModel("消费记录表")
public class ConsumptionRecords implements Serializable {

    private static final long serialVersionUID = 634186235339469602L;
    
    public ConsumptionRecords(ConsumptionRecordsEntity entity) {
        BeanUtils.copyProperties(entity, this);
    }
    
    private Long id;
    //@ApiModelProperty(value = "会员ID")
    @NotNull(message = "会员ID 不能为空")
    private Long memberId;
    /* 会员名称 */
    private String memberName;
    //@ApiModelProperty(value = "操作人ID")
    @NotNull(message = "操作人ID 不能为空")
    private Long userId;
    //@ApiModelProperty(value = "消费金额")
    @NotNull(message = "消费金额(充值) 不能为空")
    private Double amount;
    @NotNull(message = "消费金额(赠送) 不能为空")
    private Double giftAmount;
    //@ApiModelProperty(value = "消费项目")
    @NotEmpty(message = "消费项目 不能为空")
    private String items;
    //@ApiModelProperty(value = "消费时间")
    @NotNull(message = "消费时间 不能为空")
    private LocalDateTime consumptionTime;

    private String label;
    //@ApiModelProperty(value = "是否删除", hidden = true)
    private Integer del;
    //@ApiModelProperty(value = "最后修改时间", notes = "yyyy-MM-dd HH:mm:ss", example = "2020-01-01 00:00:00", hidden = true)
    private LocalDateTime last;
    //@ApiModelProperty(value = "创建时间", notes = "yyyy-MM-dd HH:mm:ss", example = "2020-01-01 00:00:00", hidden = true)
    private LocalDateTime time;
    //@ApiModelProperty(value = "创建人", hidden = true)
    private String createdBy;
    //@ApiModelProperty(value = "最后修改人", hidden = true)
    private String modifiedBy;
    //@ApiModelProperty(value = "版本")
    private Integer version;
    //@ApiModelProperty(value = "操作人姓名")
    private String operators;
    /* 进店渠道 */
    private String fitEntryChannels;
}
